package com.atguigu.yygh.hosp.controller;

import com.atguigu.yygh.hosp.service.HospitalSetService;
import com.atguigu.yygh.model.hosp.Hospital;
import com.atguigu.yygh.model.hosp.HospitalSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.swing.plaf.basic.BasicScrollPaneUI;
import java.util.List;

/**
 * @Author: 老文
 * @Date: 2021/8/13 10:49
 */
@RestController
@RequestMapping("/admin/hosp/hospitalSet")
public class HospitalSetController
{
    //注入Service
    @Autowired
    private HospitalSetService hospitalSetService;

    //https://localhost:8201/admin/hosp/hospitalSet/findAll
    //查询医院所有数据
    @GetMapping("findAll")
    public List<HospitalSet> finAllHospitalSet()
    {
        List<HospitalSet> list=hospitalSetService.list();
        return list;
    }
    /*逻辑删除医院设置*/
    @DeleteMapping("id")
    public boolean removeHospSet(@PathVariable Long id)
    {
        boolean flag=hospitalSetService.removeById(id);
        return flag;
    }

}
